package com.lzy.masshappy.common.enums;

import lombok.Data;
import lombok.Getter;

@Getter
public enum RespCodeEnum {

    SUCCESS(200, "成功"),

    FAIL(500, "失败"),

    NOT_FOUND(404, "未找到"),

    UNAUTHORIZED(401, "未授权"),

    FORBIDDEN(403, "禁止访问"),

    NOT_ACCEPTABLE(406, "请求数据格式错误"),

    REQUEST_TIMEOUT(408, "请求超时"),

    CONFLICT(409, "请求冲突"),

    GONE(410, "请求的资源已不存在"),

    UNSUPPORTED_MEDIA_TYPE(415, "不支持的媒体类型"),

    TOO_MANY_REQUESTS(429, "请求过于频繁"),

    SERVICE_UNAVAILABLE(503, "服务不可用"),
    ;

    private final int code;
    private final String message;
    RespCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
